package com.exchange.a;

import android.view.animation.Interpolator;

public class a
  implements Interpolator
{
  private b.a a;
  private float b;
  private float c;

  public a(b.a parama, float paramFloat1, float paramFloat2)
  {
    this.a = parama;
    this.b = paramFloat1;
    this.c = paramFloat2;
  }

  private float a(float paramFloat1, float paramFloat2, float paramFloat3)
  {
    float f1;
    float f5;
    if (paramFloat1 == 0F)
      f5 = 0F;
    while (true)
    {
      return f5;
      if (paramFloat1 < 1F)
        break;
      f5 = 1F;
    }
    if (paramFloat3 == 0F)
      f1 = 0.30000001192092896F;
    while (true)
    {
      float f2;
      float f3;
      if ((paramFloat2 == 0F) || (paramFloat2 < 1F))
      {
        f2 = f1 / 4.0F;
        f3 = 1F;
      }
      while (true)
      {
        while (true)
        {
          double d = f3;
          float f4 = paramFloat1 - 1F;
          f5 = (float)(-(d * Math.pow(2.0D, 10.0F * f4) * Math.sin(6.2831853071795862D * (f4 - f2) / f1)));
        }
        f2 = (float)(f1 / 6.2831853071795862D * Math.asin(1F / paramFloat2));
        f3 = paramFloat2;
      }
      f1 = paramFloat3;
    }
  }

  private float b(float paramFloat1, float paramFloat2, float paramFloat3)
  {
    float f1;
    float f4;
    if (paramFloat1 == 0F)
      f4 = 0F;
    while (true)
    {
      return f4;
      if (paramFloat1 < 1F)
        break;
      f4 = 1F;
    }
    if (paramFloat3 == 0F)
      f1 = 0.30000001192092896F;
    while (true)
    {
      float f2;
      float f3;
      if ((paramFloat2 == 0F) || (paramFloat2 < 1F))
      {
        f2 = f1 / 4.0F;
        f3 = 1F;
      }
      while (true)
      {
        while (true)
          f4 = (float)(1D + f3 * Math.pow(2.0D, -10.0F * paramFloat1) * Math.sin(6.2831853071795862D * (paramFloat1 - f2) / f1));
        f2 = (float)(f1 / 6.2831853071795862D * Math.asin(1F / paramFloat2));
        f3 = paramFloat2;
      }
      f1 = paramFloat3;
    }
  }

  private float c(float paramFloat1, float paramFloat2, float paramFloat3)
  {
    float f1;
    float f7;
    if (paramFloat1 == 0F)
      f7 = 0F;
    while (true)
    {
      return f7;
      if (paramFloat1 < 1F)
        break;
      f7 = 1F;
    }
    if (paramFloat3 == 0F)
      f1 = 0.45000001788139343F;
    while (true)
    {
      while (true)
      {
        float f3;
        float f4;
        float f5;
        if ((paramFloat2 == 0F) || (paramFloat2 < 1F))
        {
          float f2 = f1 / 4.0F;
          f3 = 1F;
          f4 = f2;
        }
        while (true)
        {
          while (true)
          {
            f5 = 2F * paramFloat1;
            if (f5 >= 1F)
              break label150;
            double d2 = f3;
            float f8 = f5 - 1F;
            f7 = (float)(-0.5D * d2 * Math.pow(2.0D, 10.0F * f8) * Math.sin(6.2831853071795862D * (f8 - f4) / f1));
          }
          f4 = (float)(f1 / 6.2831853071795862D * Math.asin(1F / paramFloat2));
          f3 = paramFloat2;
        }
        label150: double d1 = f3;
        float f6 = f5 - 1F;
        f7 = (float)(1D + 0.5D * d1 * Math.pow(2.0D, -10.0F * f6) * Math.sin(6.2831853071795862D * (f6 - f4) / f1));
      }
      f1 = paramFloat3;
    }
  }

  public float getInterpolation(float paramFloat)
  {
    float f;
    if (this.a == b.a.a)
      f = a(paramFloat, this.b, this.c);
    while (true)
    {
      while (true)
      {
        while (true)
        {
          return f;
          if (this.a != b.a.b)
            break;
          f = b(paramFloat, this.b, this.c);
        }
        if (this.a != b.a.c)
          break;
        f = c(paramFloat, this.b, this.c);
      }
      f = 0F;
    }
  }
}